<style scoped>
  .layout-con {
    height: 100%;
    width: 100%;
  }

  .menu-item span {
    display: inline-block;
    overflow: hidden;
    width: 69px;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    transition: width .2s ease .2s;
  }

  .menu-item i {
    transform: translateX(0px);
    transition: font-size .2s ease, transform .2s ease;
    vertical-align: middle;
    font-size: 16px;
  }

  .collapsed-menu span {
    width: 0px;
    transition: width .2s ease;
  }

  .collapsed-menu i {
    transform: translateX(5px);
    transition: font-size .2s ease .2s, transform .2s ease .2s;
    vertical-align: middle;
    font-size: 22px;
  }

  .title-top-center {
    text-align: center;

  }

  .title-top-right {
    float: right
  }

  .btn_tools {
    padding: 6px 10px 6px 10px;
    background: #eee;
    border-radius: 20px;
  }

  .ivu-cell-extra {
    color: #ed4014;
  }
</style>

<template>
  <Row type="flex" justify="center" align="top" class="code-row-bg">
    <Col id="staff1" span="1" :style="phoneStyle?{background:'#ffffff',height:'50px',borderTop: '1px solid #cccccc'}:{background:'#3F88D5',height:'100vh'}" :class="isAdmin == 1?'':'staffLeft'">
      <NavLeft :selected="1" :avatar="avatar"></NavLeft>
    </Col>
    <Col id="staff4" span="4" :class="isAdmin == 1?'':'staffLeft'">
      <NavMiddle :itemList="itemList"></NavMiddle>
    </Col>
    <Col id="staffDetail_phone" span="19" style="background:#f5f7f9;height:100vh;padding-bottom: 66px" :class="isAdmin == 1?'':'staffRight'">
      <Layout>
        <Content :style="phoneStyle?{padding: '0'}:{padding: '0 16px 16px'}">
          <Breadcrumb id="topTitle" :style="{margin: '16px 0'}">
            <Row type="flex" justify="space-between">
              <Col span="5">
                <span style="font-size: 16px;color: rgb(70, 76, 91);line-height: 36px;cursor: pointer"
                      @click="$router.back(-1)"><Icon type="ios-arrow-back"/>返回</span>
              </Col>
              <Col span="11" class="title-top-center"
                   style="font-size: 16px; font-weight: bold; color: rgb(70, 76, 91);text-align:center;line-height: 36px">
                {{ title }}
              </Col>
              <Col span="8" id="menuCol">
                <a type="text" size="large" style="float:right" class="btn_tools" v-if="!phoneStyle">
                  <Icon type="ios-share-alt" size="20"></Icon>
                </a>
                <a :href="'/item/parameter?id='+unit_id" type="text" size="large"
                   style="float:right;margin-right:10px;" class="btn_tools" v-if="!phoneStyle">
                  <Icon type="ios-cog" size="20"></Icon>
                </a>
                <DatePicker :size="phoneStyle?'small':'large'" type="date" placeholder="选择日期"  :editable="false" :clearable="false"
                            @on-change="dateChange" :value="chooseDate" style="float:right;margin-right:10px;"></DatePicker>
              </Col>
            </Row>
          </Breadcrumb>
          <!-- 指标板块 -->
          <Card class="quota">
            <div class="titleBackH2 gradualYellow">
              <span class="tb_top">{{name}}</span>
              <span class="tb_bottom">
                <span class="tbb_left">{{total}}</span>
                <!--<span class="tbb_right">目标  0</span>-->
              </span>
              <div class="logo" v-if="!phoneStyle"><img src="../../../../assets/img/points/hanfeng.png"/></div>
              <div :class="phoneStyle?'buttons buttonsPhone':'buttons'">
                <RadioGroup v-model="chooseType" type="button" @on-change="typeChange">
                  <Radio :label="1">尺寸</Radio>
                  <Radio :label="2">柱状图</Radio>
                  <Radio :label="3">示意图</Radio>
                </RadioGroup>
              </div>
            </div>
            <hanfengDiv :HFData="HFList" v-if="chooseTypeShow == 1"></hanfengDiv>
            <bar :barData="barList" v-if="chooseTypeShow == 2" @changeSiteBar="changeSite_bar"></bar>
            <sketch :sketchData="list" v-if="chooseTypeShow == 3" @changeSite="changeSite_sketch"></sketch>
          </Card>
        </Content>
      </Layout>
    </Col>
  </Row>
</template>

<script>
  import cookie from 'js-cookie';
  import NavLeft from '@/components/NavLeft';
  import NavMiddle from '@/components/NavMiddle';
  import sketch from '../quality/sketch/sketch_chicun'
  import hanfengDiv from './allPoint/allPoint'
  import bar from './bar/bar'

  export default {
    name: "quality_hanfeng",
    data() {
      return {
        isCollapsed: false,
        itemList: [],
        itemInfo: [],
        tjList: [],
        unit_id: "",
        chooseQS: 0,
        valueList: [],
        title: '',
        name: '',
        avatar: '',
        isAdmin: cookie.get('isAdmin'),
        page: 1,
        size: 2,
        total: 0,
        list: {
          id: 1,
          total: 0,
          items: [{
            id: 1,
            pointList: [{
              id: 1,
              name: 'PT2M',
              isClick: 0,
              x: 6,
              y: 7,
            }, {
              id: 2,
              name: 'PT2K',
              isClick: 0,
              x: 21,
              y: 10,
            }, {
              id: 3,
              name: 'PT6B',
              isClick: 0,
              x: 29,
              y: 1,
            }, {
              id: 4,
              name: 'PT6A',
              isClick: 0,
              x: 34,
              y: 3,
            }, {
              id: 5,
              name: 'PT2J',
              isClick: 0,
              x: 35,
              y: 11,
            }, {
              id: 6,
              name: 'PT2H',
              isClick: 0,
              x: 48,
              y: 1,
            }, {
              id: 7,
              name: 'PT3C',
              isClick: 0,
              x: 54,
              y: 12,
            }, {
              id: 8,
              name: 'PT4B',
              isClick: 0,
              x: 61,
              y: 8,
            }, {
              id: 9,
              name: 'PT2C',
              isClick: 0,
              x: 66,
              y: 8,
            }, {
              id: 10,
              name: 'PT2R',
              isClick: 0,
              x: 72,
              y: 8,
            }, {
              id: 11,
              name: 'PT4A',
              isClick: 0,
              x: 77,
              y: 8,
            }, {
              id: 12,
              name: 'PT2P',
              isClick: 0,
              x: 90,
              y: 3,
            },{
              id: 13,
              name: 'PT2N',
              isClick: 0,
              x: 5,
              y: 77,
            }, {
              id: 14,
              name: 'PT2L',
              isClick: 0,
              x: 16,
              y: 81,
            }, {
              id: 15,
              name: 'PT6C',
              isClick: 0,
              x: 25,
              y: 60,
            }, {
              id: 16,
              name: 'PT3G',
              isClick: 0,
              x: 33,
              y: 60,
            }, {
              id: 17,
              name: 'PT2O',
              isClick: 0,
              x: 32,
              y: 81,
            }, {
              id: 18,
              name: 'PT3E',
              isClick: 0,
              x: 44,
              y: 44,
            }, {
              id: 19,
              name: 'PT5A',
              isClick: 0,
              x: 44,
              y: 67,
            }, {
              id: 20,
              name: 'PT5C',
              isClick: 0,
              x: 50,
              y: 44,
            }, {
              id: 21,
              name: 'PT5D',
              isClick: 0,
              x: 49,
              y: 67,
            }, {
              id: 22,
              name: 'PT2F',
              isClick: 0,
              x: 49,
              y: 90,
            }, {
              id: 23,
              name: 'PT3D',
              isClick: 0,
              x: 64,
              y: 40,
            }, {
              id: 24,
              name: 'PT3F',
              isClick: 0,
              x: 64,
              y: 66,
            }, {
              id: 25,
              name: 'PT2Q',
              isClick: 0,
              x: 92,
              y: 67,
            }]
          }, {
            id: 2,
            pointList: [{
              id: 1,
              name: 'PT1J',
              isClick: 0,
              x: 4,
              y: 13,
            }, {
              id: 2,
              name: 'PT1K',
              isClick: 0,
              x: 95,
              y: 13,
            }]
          }, {
            id: 3,
            pointList: [{
              id: 1,
              name: 'PT1F',
              isClick: 0,
              x: 3,
              y: 13,
            }, {
              id: 2,
              name: 'PT1H',
              isClick: 0,
              x: 3,
              y: 26,
            }, {
              id: 3,
              name: 'PT1E',
              isClick: 0,
              x: 3,
              y: 38,
            }, {
              id: 4,
              name: 'PT1G',
              isClick: 0,
              x: 3,
              y: 47,
            }, {
              id: 5,
              name: 'PT15C',
              isClick: 0,
              x: 52,
              y: 2,
            }, {
              id: 6,
              name: 'PT15D',
              isClick: 0,
              x: 49,
              y: 62,
            }, {
              id: 7,
              name: 'PT2E',
              isClick: 0,
              x: 39,
              y: 77,
            }, {
              id: 8,
              name: 'PT2C',
              isClick: 0,
              x: 62,
              y: 2,
            }, {
              id: 9,
              name: 'PT2D',
              isClick: 0,
              x: 59,
              y: 69,
            }, {
              id: 10,
              name: 'PT2B',
              isClick: 0,
              x: 65,
              y: 77,
            }, {
              id: 11,
              name: 'PT2A',
              isClick: 0,
              x: 77,
              y: 77,
            }, {
              id: 12,
              name: 'PT1A',
              isClick: 0,
              x: 92,
              y: 10,
            }, {
              id: 13,
              name: 'PT1C',
              isClick: 0,
              x: 92,
              y: 24,
            }, {
              id: 14,
              name: 'PT1B',
              isClick: 0,
              x: 92,
              y: 45,
            }, {
              id: 15,
              name: 'PT1D',
              isClick: 0,
              x: 92,
              y: 54,
            }]
          }, {
            id: 4,
            pointList: [{
              id: 1,
              name: 'PT20A',
              isClick: 0,
              x: 14,
              y: 3,
            }, {
              id: 2,
              name: 'PT20D',
              isClick: 0,
              x: 27,
              y: 3,
            }, {
              id: 3,
              name: 'PT20E',
              isClick: 0,
              x: 36,
              y: 3,
            }, {
              id: 4,
              name: 'PT20M',
              isClick: 0,
              x: 46,
              y: 14,
            }, {
              id: 5,
              name: 'PT20N',
              isClick: 0,
              x: 53,
              y: 14,
            }, {
              id: 6,
              name: 'PT20Q',
              isClick: 0,
              x: 64,
              y: 4,
            }, {
              id: 7,
              name: 'PT20R',
              isClick: 0,
              x: 71,
              y: 4,
            }, {
              id: 8,
              name: 'PT20U',
              isClick: 0,
              x: 86,
              y: 3,
            }, {
              id: 9,
              name: 'PT20B',
              isClick: 0,
              x: 14,
              y: 53,
            }, {
              id: 10,
              name: 'PT20C',
              isClick: 0,
              x: 19,
              y: 76,
            },{
              id: 11,
              name: 'PT20F',
              isClick: 0,
              x: 38,
              y: 62,
            }, {
              id: 12,
              name: 'PT20G',
              isClick: 0,
              x: 46,
              y: 57,
            }, {
              id: 13,
              name: 'PT20J',
              isClick: 0,
              x: 49,
              y: 65,
            }, {
              id: 14,
              name: 'PT20H',
              isClick: 0,
              x: 53,
              y: 55,
            }, {
              id: 15,
              name: 'PT20P',
              isClick: 0,
              x: 62,
              y: 62,
            }, {
              id: 16,
              name: 'PT20S',
              isClick: 0,
              x: 65,
              y: 37,
            }, {
              id: 17,
              name: 'PT20T',
              isClick: 0,
              x: 79,
              y: 34,
            }, {
              id: 18,
              name: 'PT20V',
              isClick: 0,
              x: 85,
              y: 64,
            }, {
              id: 19,
              name: 'PT20K',
              isClick: 0,
              x: 46,
              y: 90,
            }, {
              id: 20,
              name: 'PT20L',
              isClick: 0,
              x: 52,
              y: 90,
            }]
          }, {
            id: 5,
            pointList: [{
              id: 1,
              name: 'PT9D',
              isClick: 0,
              x: 70,
              y: 40,
            }, {
              id: 2,
              name: 'PT9B',
              isClick: 0,
              x: 72,
              y: 51,
            }, {
              id: 3,
              name: 'PT15a',
              isClick: 0,
              x: 77,
              y: 73,
            }]
          }, {
            id: 6,
            pointList: [{
              id: 1,
              name: 'PT9C',
              isClick: 0,
              x: 18,
              y: 19,
            }, {
              id: 2,
              name: 'PT9A',
              isClick: 0,
              x: 18,
              y: 39,
            }]
          }, {
            id: 7,
            pointList: [{
              id: 1,
              name: 'PT3A',
              isClick: 0,
              x: 33,
              y: 38,
            }, {
              id: 2,
              name: 'PT3B',
              isClick: 0,
              x: 46,
              y: 57,
            }]
          }, {
            id: 8,
            pointList: [{
              id: 1,
              name: 'PT7F',
              isClick: 0,
              x: 44,
              y: 15,
            }, {
              id: 2,
              name: 'PT7E',
              isClick: 0,
              x: 59,
              y: 15,
            }, {
              id: 3,
              name: 'PT15B',
              isClick: 0,
              x: 66,
              y: 39,
            }, {
              id: 4,
              name: 'PT7D',
              isClick: 0,
              x: 20,
              y: 73,
            }, {
              id: 5,
              name: 'PT7A',
              isClick: 0,
              x: 31,
              y: 78,
            }, {
              id: 6,
              name: 'PT7B',
              isClick: 0,
              x: 70,
              y: 75,
            }, {
              id: 7,
              name: 'PT7C',
              isClick: 0,
              x: 76,
              y: 65,
            }]
          }, {
            id: 9,
            pointList: [{
              id: 1,
              name: 'PT19B',
              isClick: 0,
              x: 21,
              y: 50,
            }, {
              id: 2,
              name: 'PT19A',
              isClick: 0,
              x: 57,
              y: 51,
            }, {
              id: 3,
              name: 'PT17A',
              isClick: 0,
              x: 21,
              y: 59,
            }, {
              id: 4,
              name: 'PT17B',
              isClick: 0,
              x: 57,
              y: 60,
            }]
          }, {
            id: 10,
            pointList: [{
              id: 1,
              name: 'PT12A',
              isClick: 0,
              x: 17,
              y: 42,
            }]
          }, {
            id: 11,
            pointList: [{
              id: 1,
              name: 'PT8A',
              isClick: 0,
              x: 39,
              y: 83,
            }, {
              id: 2,
              name: 'PT8C',
              isClick: 0,
              x: 50,
              y: 74,
            }, {
              id: 3,
              name: 'PT8B',
              isClick: 0,
              x: 59,
              y: 81,
            }, {
              id: 4,
              name: 'PT8D',
              isClick: 0,
              x: 68,
              y: 78,
            }]
          }, {
            id: 12,
            name: 'L放大',
            pointList: [{
              id: 1,
              name: 'PT11B',
              isClick: 0,
              x: 32,
              y: 69,
            }, {
              id: 2,
              name: 'PT11A',
              isClick: 0,
              x: 58,
              y: 69,
            }]
          }],
        },
        list2: {
          id: 1,
          total: 0,
          items: [{
            id: 1,
            pointList: [{
              id: 1,
              name: 'PT2M',
              isClick: 0,
              x: 6,
              y: 7,
            }, {
              id: 2,
              name: 'PT2K',
              isClick: 0,
              x: 21,
              y: 10,
            }, {
              id: 3,
              name: 'PT6B',
              isClick: 0,
              x: 29,
              y: 1,
            }, {
              id: 4,
              name: 'PT6A',
              isClick: 0,
              x: 34,
              y: 3,
            }, {
              id: 5,
              name: 'PT2J',
              isClick: 0,
              x: 35,
              y: 11,
            }, {
              id: 6,
              name: 'PT2H',
              isClick: 0,
              x: 48,
              y: 1,
            }, {
              id: 7,
              name: 'PT3C',
              isClick: 0,
              x: 54,
              y: 12,
            }, {
              id: 8,
              name: 'PT4B',
              isClick: 0,
              x: 61,
              y: 8,
            }, {
              id: 9,
              name: 'PT2C',
              isClick: 0,
              x: 66,
              y: 8,
            }, {
              id: 10,
              name: 'PT2R',
              isClick: 0,
              x: 72,
              y: 8,
            }, {
              id: 11,
              name: 'PT4A',
              isClick: 0,
              x: 77,
              y: 8,
            }, {
              id: 12,
              name: 'PT2P',
              isClick: 0,
              x: 90,
              y: 3,
            },{
              id: 13,
              name: 'PT2N',
              isClick: 0,
              x: 5,
              y: 77,
            }, {
              id: 14,
              name: 'PT2L',
              isClick: 0,
              x: 16,
              y: 81,
            }, {
              id: 15,
              name: 'PT6C',
              isClick: 0,
              x: 25,
              y: 60,
            }, {
              id: 16,
              name: 'PT3G',
              isClick: 0,
              x: 33,
              y: 60,
            }, {
              id: 17,
              name: 'PT2O',
              isClick: 0,
              x: 32,
              y: 81,
            }, {
              id: 18,
              name: 'PT3E',
              isClick: 0,
              x: 44,
              y: 44,
            }, {
              id: 19,
              name: 'PT5A',
              isClick: 0,
              x: 44,
              y: 67,
            }, {
              id: 20,
              name: 'PT5C',
              isClick: 0,
              x: 50,
              y: 44,
            }, {
              id: 21,
              name: 'PT5D',
              isClick: 0,
              x: 49,
              y: 67,
            }, {
              id: 22,
              name: 'PT2F',
              isClick: 0,
              x: 49,
              y: 90,
            }, {
              id: 23,
              name: 'PT3D',
              isClick: 0,
              x: 64,
              y: 40,
            }, {
              id: 24,
              name: 'PT3F',
              isClick: 0,
              x: 64,
              y: 66,
            }, {
              id: 25,
              name: 'PT2Q',
              isClick: 0,
              x: 92,
              y: 67,
            }]
          }, {
            id: 2,
            pointList: [{
              id: 1,
              name: 'PT1J',
              isClick: 0,
              x: 4,
              y: 13,
            }, {
              id: 2,
              name: 'PT1K',
              isClick: 0,
              x: 95,
              y: 13,
            }]
          }, {
            id: 3,
            pointList: [{
              id: 1,
              name: 'PT1F',
              isClick: 0,
              x: 3,
              y: 13,
            }, {
              id: 2,
              name: 'PT1H',
              isClick: 0,
              x: 3,
              y: 26,
            }, {
              id: 3,
              name: 'PT1E',
              isClick: 0,
              x: 3,
              y: 38,
            }, {
              id: 4,
              name: 'PT1G',
              isClick: 0,
              x: 3,
              y: 47,
            }, {
              id: 5,
              name: 'PT15C',
              isClick: 0,
              x: 52,
              y: 2,
            }, {
              id: 6,
              name: 'PT15D',
              isClick: 0,
              x: 49,
              y: 62,
            }, {
              id: 7,
              name: 'PT2E',
              isClick: 0,
              x: 39,
              y: 77,
            }, {
              id: 8,
              name: 'PT2C',
              isClick: 0,
              x: 62,
              y: 2,
            }, {
              id: 9,
              name: 'PT2D',
              isClick: 0,
              x: 59,
              y: 69,
            }, {
              id: 10,
              name: 'PT2B',
              isClick: 0,
              x: 65,
              y: 77,
            }, {
              id: 11,
              name: 'PT2A',
              isClick: 0,
              x: 77,
              y: 77,
            }, {
              id: 12,
              name: 'PT1A',
              isClick: 0,
              x: 92,
              y: 10,
            }, {
              id: 13,
              name: 'PT1C',
              isClick: 0,
              x: 92,
              y: 24,
            }, {
              id: 14,
              name: 'PT1B',
              isClick: 0,
              x: 92,
              y: 45,
            }, {
              id: 15,
              name: 'PT1D',
              isClick: 0,
              x: 92,
              y: 54,
            }]
          }, {
            id: 4,
            pointList: [{
              id: 1,
              name: 'PT20A',
              isClick: 0,
              x: 14,
              y: 3,
            }, {
              id: 2,
              name: 'PT20D',
              isClick: 0,
              x: 27,
              y: 3,
            }, {
              id: 3,
              name: 'PT20E',
              isClick: 0,
              x: 36,
              y: 3,
            }, {
              id: 4,
              name: 'PT20M',
              isClick: 0,
              x: 46,
              y: 14,
            }, {
              id: 5,
              name: 'PT20N',
              isClick: 0,
              x: 53,
              y: 14,
            }, {
              id: 6,
              name: 'PT20Q',
              isClick: 0,
              x: 64,
              y: 4,
            }, {
              id: 7,
              name: 'PT20R',
              isClick: 0,
              x: 71,
              y: 4,
            }, {
              id: 8,
              name: 'PT20U',
              isClick: 0,
              x: 86,
              y: 3,
            }, {
              id: 9,
              name: 'PT20B',
              isClick: 0,
              x: 14,
              y: 53,
            }, {
              id: 10,
              name: 'PT20C',
              isClick: 0,
              x: 19,
              y: 76,
            },{
              id: 11,
              name: 'PT20F',
              isClick: 0,
              x: 38,
              y: 62,
            }, {
              id: 12,
              name: 'PT20G',
              isClick: 0,
              x: 46,
              y: 57,
            }, {
              id: 13,
              name: 'PT20J',
              isClick: 0,
              x: 49,
              y: 65,
            }, {
              id: 14,
              name: 'PT20H',
              isClick: 0,
              x: 53,
              y: 55,
            }, {
              id: 15,
              name: 'PT20P',
              isClick: 0,
              x: 62,
              y: 62,
            }, {
              id: 16,
              name: 'PT20S',
              isClick: 0,
              x: 65,
              y: 37,
            }, {
              id: 17,
              name: 'PT20T',
              isClick: 0,
              x: 79,
              y: 34,
            }, {
              id: 18,
              name: 'PT20V',
              isClick: 0,
              x: 85,
              y: 64,
            }, {
              id: 19,
              name: 'PT20K',
              isClick: 0,
              x: 46,
              y: 90,
            }, {
              id: 20,
              name: 'PT20L',
              isClick: 0,
              x: 52,
              y: 90,
            }]
          }, {
            id: 5,
            pointList: [{
              id: 1,
              name: 'PT9D',
              isClick: 0,
              x: 70,
              y: 40,
            }, {
              id: 2,
              name: 'PT9B',
              isClick: 0,
              x: 72,
              y: 51,
            }, {
              id: 3,
              name: 'PT15a',
              isClick: 0,
              x: 77,
              y: 73,
            }]
          }, {
            id: 6,
            pointList: [{
              id: 1,
              name: 'PT9C',
              isClick: 0,
              x: 18,
              y: 19,
            }, {
              id: 2,
              name: 'PT9A',
              isClick: 0,
              x: 18,
              y: 39,
            }]
          }, {
            id: 7,
            pointList: [{
              id: 1,
              name: 'PT3A',
              isClick: 0,
              x: 33,
              y: 38,
            }, {
              id: 2,
              name: 'PT3B',
              isClick: 0,
              x: 46,
              y: 57,
            }]
          }, {
            id: 8,
            pointList: [{
              id: 1,
              name: 'PT7F',
              isClick: 0,
              x: 44,
              y: 15,
            }, {
              id: 2,
              name: 'PT7E',
              isClick: 0,
              x: 59,
              y: 15,
            }, {
              id: 3,
              name: 'PT15B',
              isClick: 0,
              x: 66,
              y: 39,
            }, {
              id: 4,
              name: 'PT7D',
              isClick: 0,
              x: 20,
              y: 73,
            }, {
              id: 5,
              name: 'PT7A',
              isClick: 0,
              x: 31,
              y: 78,
            }, {
              id: 6,
              name: 'PT7B',
              isClick: 0,
              x: 70,
              y: 75,
            }, {
              id: 7,
              name: 'PT7C',
              isClick: 0,
              x: 76,
              y: 65,
            }]
          }, {
            id: 9,
            pointList: [{
              id: 1,
              name: 'PT19B',
              isClick: 0,
              x: 21,
              y: 50,
            }, {
              id: 2,
              name: 'PT19A',
              isClick: 0,
              x: 57,
              y: 51,
            }, {
              id: 3,
              name: 'PT17A',
              isClick: 0,
              x: 21,
              y: 59,
            }, {
              id: 4,
              name: 'PT17B',
              isClick: 0,
              x: 57,
              y: 60,
            }]
          }, {
            id: 10,
            pointList: [{
              id: 1,
              name: 'PT12A',
              isClick: 0,
              x: 17,
              y: 42,
            }]
          }, {
            id: 11,
            pointList: [{
              id: 1,
              name: 'PT8A',
              isClick: 0,
              x: 39,
              y: 83,
            }, {
              id: 2,
              name: 'PT8C',
              isClick: 0,
              x: 50,
              y: 74,
            }, {
              id: 3,
              name: 'PT8B',
              isClick: 0,
              x: 59,
              y: 81,
            }, {
              id: 4,
              name: 'PT8D',
              isClick: 0,
              x: 68,
              y: 78,
            }]
          }, {
            id: 12,
            name: 'L放大',
            pointList: [{
              id: 1,
              name: 'PT11B',
              isClick: 0,
              x: 32,
              y: 69,
            }, {
              id: 2,
              name: 'PT11A',
              isClick: 0,
              x: 58,
              y: 69,
            }]
          }],
        },
        HFList: [],
        barList: [],
        chooseDate: cookie.get('chooseDate'),
        chooseType: 3,
        chooseTypeShow: 3,
        phoneStyle: false,
      };
    },
    components: {NavLeft: NavLeft, NavMiddle: NavMiddle, sketch: sketch, bar: bar,hanfengDiv: hanfengDiv},
    methods: {
      getData(siteId) {
        let self = this
        var uid = cookie.get('uid');
        var token = cookie.get('token');
        var unit_id = localStorage.getItem('middleId')
        if (!unit_id) {
          this.$Message.warning('无参数不能访问');
          return;
          //store.dispatch('setLoginStatus', 0)
          //window.location.reload()
        }
        this.$Loading.start();
        var str = {
          uid: uid,
          token: token,
          unit_id: unit_id,
          ymd: self.chooseDate,
          site_id: siteId,
          type: 1,
          loginType: cookie.get('loginType')
        };
        // console.log(str,123);
        var strdata = this.$twjsdes.enstr(str);
        this.$http.post(this.$API_URL + '/info/hinttu', {alldata: strdata.alldata}).then((response) => {
          this.$Loading.finish();
          var res = this.$twjsdes.decrypt(response.data.alldata);
          console.log(res)
          this.itemList = res.data.item_all_list;
          localStorage.setItem('middleId',res.data.unit_id)
          this.avatar = res.data.avatar;
          self.title = res.data.title
          self.name = res.data.name
          self.total = res.data.confirm_value
          if (res.data.list.items.length > 0) {
            self.list = res.data.list
          } else {
            self.list = self.list2
          }
          self.list.device_list = res.data.device_list
          self.list.device_list.push({
            device_id: null,
            name: "全部设备",
            site_id: null,
            unit_id: self.list.device_list[0].unit_id,
          })
          self.chooseTypeShow = 3
        }).catch(function (error) {
          this.$Modal.error({
            title: '提示',
            content: '网络连接错误，请检查后重试'
          });
          //console.log(error);
        });
      },
      getBar(siteId) {
        let self = this
        var uid = cookie.get('uid');
        var token = cookie.get('token');
        var unit_id = localStorage.getItem('middleId')
        if (!unit_id) {
          this.$Message.warning('无参数不能访问');
          return;
          //store.dispatch('setLoginStatus', 0)
          //window.location.reload()
        }
        this.$Loading.start();
        var str = {
          uid: uid,
          token: token,
          unit_id: unit_id,
          ymd: self.chooseDate,
          site_id: siteId,
          type: 1,
          loginType: cookie.get('loginType')
        };
        // console.log(str);
        var strdata = this.$twjsdes.enstr(str);
        this.$http.post(this.$API_URL + '/info/verticaltu', {alldata: strdata.alldata}).then((response) => {
          this.$Loading.finish();
          var res = this.$twjsdes.decrypt(response.data.alldata);
          // console.log(res,321)
          this.itemList = res.data.item_all_list;
          localStorage.setItem('middleId',res.data.unit_id)
          this.avatar = res.data.avatar;
          self.title = res.data.title
          self.name = res.data.name
          self.total = res.data.confirm_value
          let data = {
            dataList: res.data.data,
            list: res.data.list,
            isChiCun: true
          }
          self.barList = data
          self.chooseTypeShow = 2
        }).catch(function (error) {
          this.$Modal.error({
            title: '提示',
            content: '网络连接错误，请检查后重试'
          });
          //console.log(error);
        });
      },
      getChicun() {
        let self = this
        var uid = cookie.get('uid');
        var token = cookie.get('token');
        var unit_id = localStorage.getItem('middleId')
        if (!unit_id) {
          this.$Message.warning('无参数不能访问');
          return;
          //store.dispatch('setLoginStatus', 0)
          //window.location.reload()
        }
        this.$Loading.start();
        var str = {
          uid: uid,
          token: token,
          unit_id: unit_id,
          ymd: self.chooseDate,
          type: 1,
          loginType: cookie.get('loginType')
        };
        // console.log(str);
        var strdata = this.$twjsdes.enstr(str);
        this.$http.post(this.$API_URL + '/info/caketu', {alldata: strdata.alldata}).then((response) => {
          this.$Loading.finish();
          var res = this.$twjsdes.decrypt(response.data.alldata);
          // console.log(res)
          this.itemList = res.data.item_all_list;
          localStorage.setItem('middleId',res.data.unit_id)
          this.avatar = res.data.avatar;
          self.title = res.data.title
          self.name = res.data.name
          self.total = res.data.confirm_value
          self.HFList = res.data.list
          self.chooseTypeShow = 1
        }).catch(function (error) {
          this.$Modal.error({
            title: '提示',
            content: '网络连接错误，请检查后重试'
          });
          //console.log(error);
        });
      },
      dateChange(val) {
        let self = this
        self.chooseDate = val
        cookie.set('chooseDate',val)
        switch (self.chooseTypeShow) {
          case 1:
            self.getChicun()
            break;
          case 2:
            self.getBar(null)
            break;
          case 3:
            self.getData(null)
            break;
        }
      },
      typeChange(index) {
        let self = this
        switch (index) {
          case 1:
            self.getChicun()
            break;
          case 2:
            self.getBar(null)
            break;
          case 3:
            self.getData(null)
            break;
        }
      },
      changeSite_sketch(item) {
        let self = this
        self.getData(item)
      },
      changeSite_bar(item) {
        let self = this
        self.getBar(item)
      },
    },
    computed: {
      menuitemClasses: function () {
        return [
          'menu-item',
          this.isCollapsed ? 'collapsed-menu' : ''
        ]
      }
    },
    created() {
      let self = this
      let dw = document.body.clientWidth
      if (dw < 820) {
        self.phoneStyle = true
      } else {
        self.phoneStyle = false
      }
      window.document.title = 'SCS详情';
      this.title = this.$route.query.title
    },
    mounted() {
      this.getData(null);
    }
  }
</script>

<style lang="less">
  #menuCol {
    #menu {
      font-size: 20px;
      background: #3384dd;
      color: #fff;
      padding: 4px 6px;
      border-radius: 50px;
      cursor: pointer;
    }
    .ivu-select-dropdown {
      background: #515151;
      color: #fff;
      opacity: .8;
      .ivu-dropdown-item {
        background: #515151;
        color: #fff;
        opacity: 1;
        text-align: center;
      }
    }
  }
  .quota {
    display: flex;
    flex-direction: column;
    padding: 0;
    .ivu-card-body {
      padding: 0;
      .titleBackH2 {
        width: 100%;
        height: 104px !important;
        text-align: left;
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        color: #fff;
        font-size: 17px;
        padding-left: 21px;
        display: flex;
        flex-direction: column;
        position: relative;
        .tb_top {
          font-size: 16px;
          margin-top: 20px;
          margin-bottom: 17px;
        }
        .tb_bottom {
          display: flex;
          flex-direction: row;
          .tbb_left {
            font-size: 26px;
            margin-right: 70px;
            line-height: 26px;
          }
          .tbb_right {
            font-size: 14px;
            line-height: 26px;
          }
        }
        .logo{
          width: 33.33%;
          height: 100%;
          position: absolute;
          right: 33.33%;
          top: 0;
          border-bottom: 1px solid #e5e5e5;
          img{
            width: 100%;
            height: 100%;
          }
        }
        .buttons{
          width: 33.33%;
          height: 100%;
          position: absolute;
          right: 0;
          top: 0;
          display: flex;
          flex-direction: column;
          justify-content: center;
          box-sizing: border-box;
          background: #fff;
          border-left: 1px solid #e5e5e5;
          padding: 0 5%;
          box-sizing: border-box;
          border-bottom: 1px solid #e5e5e5;
        }
      }
    }
  }
  .cards {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    .cdLeft {
      display: flex;
      flex-direction: column;
      .cl_top {
        font-size: 16px;
        color: #222222;
      }
      .cl_down {
        font-size: 16px;
        color: #666666;
        margin-top: 10px;
        .cld_color {
          color: #ffb11b;
          margin-left: 10px;
        }
        .cld_color2 {
          color: #56b44a;
          margin-left: 10px;
        }
      }
      .special {
        background: #dc4444;
        color: #fff;
        font-size: 13px;
        padding: 2px 4px;
      }
    }
    .cdright {
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
  }
  .ivu-card-extra {
    top: 11px;
    .conButtons {
      display: flex;
      flex-direction: row;
      .buts {
        padding: 4px 8px;
        background: #f5f5f5;
        font-size: 14px;
        color: #666666;
        margin-right: 10px;
        cursor: pointer;
        border-radius: 3px;
      }
      .chooseButs {
        background: #3f8fe0;
        color: #fff;
      }
    }
  }
  .ivu-card-body {
    background: #f9f9f9;
    .contentDiv {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      flex-wrap: wrap;
      .con {
        width: 32.5%;
        margin-top: 16px;
        display: flex;
        flex-direction: column;
        position: relative;
        cursor: pointer;
        .colorLabel {
          display: block;
          width: 40px;
          height: 20px;
          line-height: 20px;
          text-align: center;
          font-size: 14px;
          color: #fff;
          position: absolute;
          top: 0;
          left: 16px;
        }
        .times {
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          margin-top: 18px;
          margin-bottom: 18px;
          line-height: 18px;
          .timesLeft {
            font-size: 16px;
            color: #666666;
          }
          .timesRight {
            font-size: 18px;
            color: #3f8fe0;
          }
        }
        .conText {
          font-size: 20px;
          color: #222222;
          overflow: hidden;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
        }
        .needExplain {
          color: #dc4444;
        }
      }
      .con:nth-child(1), .con:nth-child(2), .con:nth-child(3) {
        margin-top: 0;
      }
      .more {
        width: 100%;
        height: 60px;
        text-align: center;
        line-height: 60px;
        font-size: 18px;
        color: #999999;
        background: #fff;
        margin-top: 16px;
        cursor: pointer;
      }
    }
  }
  /* 手机竖屏 */
  @media screen and (min-width: 0px) and (max-width: 820px) {
    #staff1 {
      position: fixed;
      left: 0;
      bottom: 0;
      z-index: 99;
      width: 100%;
      height: 50px !important;
    }
    #staff4 {
      display: none;
    }
    #staffDetail_phone{
      width: 100%;
      #topTitle{
        padding: 0 16px;
        margin: 8px 0 !important;
        .title-top-center{
          font-size: 14px;
          height: 36px;
          overflow: hidden;
          text-overflow:ellipsis;
          white-space: nowrap;
          max-width: 50%;
        }
        #menuCol{
          display: flex;
          flex-direction: column;
          justify-content: center;
          padding: 0 !important;
          margin: 0 !important;
          .ivu-date-picker{
            width: 100% !important;
          }
          .ivu-select-dropdown{
            left: -81px !important;
          }
        }
      }
      .titleBackH2{
        padding-left: 10px !important;
        height: 52px !important;
        display: flex;
        flex-direction: row;
        .tb_top{
          line-height: 52px;
          margin: 0;
          margin-right: 10px;
        }
        .tb_bottom{
          display: flex;
          flex-direction: column;
          justify-content: center;
          .tbb_left{
            margin-right: 0;
          }
        }
        .buttonsPhone{
          top: 100%;
          width: 100%;
          padding-left: 10px !important;
          border-left: none;
        }
      }
    }
  }
</style>
